#ifndef MYMATH_H_
#define MYMATH_H_

namespace mymath {
	inline double ScalarProduct(const double* vec1, const double* vec2, const int size)
	{
		double res = 0.0;
		for (int i = 0; i < size; ++i)
			res += vec1[i] * vec2[i];
		return res;
	}

	inline double* VectScalar(const double* vec, double scalar, const int size)
	{
		double* res = new double[size];

		for (int i = 0; i < size; ++i)
			res[i] = vec[i] * scalar;
		return res;
	}

	inline double* VectSum(const double* vec1, const double* vec2, const int size)
	{
		double* res = new double[size];

		for (int i = 0; i < size; ++i)
			res[i] = vec1[i] + vec2[i];
		return res;
	}

}//end namespace


#endif